/*
*
==============================================================================
*  Name        : 
*  Part of     : Omen Game Engine
*  Description : 
*  Version     : 1.0
*
*  Copyright (c) 2013 Lauri Kortevaara.
* 
==============================================================================
*/

#pragma once

#include "OmenConfig.h"
#include "IOmenObject.h"

#include <IOmenRenderer.h>
#include <IOmenLightSource.h>
#include <IOmenModel.h>
#include <IOmenCamera.h>
#include <IOmenShader.h>

namespace Omen
{
    class IKernel;

    class OMEN_API IRenderer : public Omen::IObject
    {
    public:
        virtual Omen_GUID classId() const = 0;  //
        
    public: 
        virtual unsigned long windowHandle() const = 0;


        /// Vertex and index buffers
        virtual void createVertexBuffer( IMesh* pMesh ) const = 0; /// <summary>Renderer creates a vertex buffer for this mesh</summary>
        virtual void createIndexBuffer( IMesh* pMesh ) const = 0;  /// <summary>Renderer creates an index buffer for this mesh</summary>

        /// Shader creation
        virtual bool createShader( const std::wstring& shaderName, Omen::IShader*& pShader ) const = 0; /// <summary>Create a shader with given name</summary>

        /// Rendering
        virtual void beginRendering() const = 0;
        virtual void render(Omen::ICamera* pCamera) const = 0;
        virtual void render(Omen::ILight** pLights, unsigned int numLights) const = 0;
        virtual void render(Omen::IModel** pCameras, unsigned int numModels) const = 0;
        virtual void endRendering() const = 0;

    protected:
    private:
    };
}